/* MarkdownGuide 组件样式 - 现代化设计 */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-container {
  background: var(--theme-bg-primary);
  border-radius: 20px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid var(--theme-border-light);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  background: linear-gradient(135deg, var(--theme-bg-primary), var(--theme-bg-secondary));
  border-bottom: 1px solid var(--theme-border-light);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover));
  border-radius: 12px;
  color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.header-text h2 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--theme-text-primary);
  background: linear-gradient(135deg, var(--theme-text-primary), var(--theme-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-text p {
  margin: 0;
  font-size: 14px;
  color: var(--theme-text-secondary);
  font-weight: 500;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--theme-bg-tertiary);
  border-radius: 12px;
  cursor: pointer;
  color: var(--theme-text-secondary);
  transition: all 0.2s ease;
  border: 1px solid var(--theme-border-light);
}

.close-btn:hover {
  background: var(--theme-bg-secondary);
  color: var(--theme-text-primary);
  transform: scale(1.05);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  background: var(--theme-bg-primary);
}

.guide-sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.guide-section {
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--theme-border-light);
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover));
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--theme-text-primary);
  letter-spacing: -0.5px;
}

.syntax-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.syntax-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border-light);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.syntax-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--theme-primary);
}

.syntax-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.syntax-left h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.syntax-left h4::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover));
  border-radius: 2px;
}

.syntax-right {
  display: flex;
  align-items: center;
  background: var(--theme-bg-primary);
  border: 1px solid var(--theme-border-light);
  border-radius: 8px;
  padding: 16px;
  min-height: 60px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.syntax-left code {
  background: var(--theme-code-bg);
  color: var(--theme-code-text);
  padding: 16px 20px;
  border-radius: 8px;
  font-family: var(--theme-code-font-family);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--theme-code-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow-x: auto;
  white-space: pre-line;
  display: block;
}

.syntax-left code::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover));
  border-radius: 0 2px 2px 0;
}

/* 演示元素样式 */
.demo-h1, .demo-h2, .demo-h3 {
  margin: 8px 0;
  font-weight: 700;
  color: var(--theme-text-primary);
  line-height: 1.3;
}

.demo-h1 {
  font-size: 24px;
  background: linear-gradient(135deg, var(--theme-text-primary), var(--theme-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.demo-h2 { font-size: 20px; }
.demo-h3 { font-size: 18px; }

.demo-quote {
  margin: 12px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--theme-primary);
  background: var(--theme-bg-tertiary);
  border-radius: 0 8px 8px 0;
  color: var(--theme-text-secondary);
  font-style: italic;
  position: relative;
}

.demo-quote::before {
  content: '"';
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 24px;
  color: var(--theme-primary);
  font-weight: bold;
}

.demo-code {
  background: var(--theme-code-bg);
  color: var(--theme-code-text);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--theme-code-font-family);
  font-size: 13px;
  border: 1px solid var(--theme-code-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.demo-list {
  margin: 12px 0;
  padding-left: 24px;
  color: var(--theme-text-primary);
}

.demo-list li {
  margin: 8px 0;
  line-height: 1.5;
}

.demo-list ul {
  margin-top: 8px;
  padding-left: 20px;
}

.demo-task-list {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.demo-task-list li {
  margin: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--theme-text-primary);
}

.demo-task-list .task-done {
  color: var(--theme-primary);
}

.demo-task-list .task-todo {
  color: var(--theme-text-secondary);
}

.demo-link {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.demo-link:hover {
  border-bottom-color: var(--theme-primary);
}

.demo-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--theme-bg-tertiary);
  border: 2px dashed var(--theme-border-medium);
  border-radius: 8px;
  color: var(--theme-text-secondary);
}

.demo-code-block {
  background: var(--theme-code-bg);
  color: var(--theme-code-text);
  padding: 16px 20px;
  border-radius: 8px;
  font-family: var(--theme-code-font-family);
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--theme-code-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 12px 0;
  overflow-x: auto;
}

.demo-hr {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--theme-primary), transparent);
  margin: 20px 0;
  border-radius: 2px;
  width: 100%;
  opacity: 0.8;
}

/* 确保分隔线在预览区域中可见 */
.syntax-right .demo-hr {
  margin: 16px 0;
  height: 2px;
  background: linear-gradient(90deg, var(--theme-border-light), var(--theme-primary), var(--theme-border-light));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 演示表格样式 */
.demo-table {
  border-collapse: collapse;
  margin: 12px 0;
  width: 100%;
  font-size: 14px;
  border: 1px solid var(--theme-border-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.demo-table th,
.demo-table td {
  border: 1px solid var(--theme-border-light);
  padding: 12px 16px;
  text-align: left;
}

.demo-table th {
  background: linear-gradient(135deg, var(--theme-bg-secondary), var(--theme-bg-tertiary));
  font-weight: 600;
  color: var(--theme-text-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-table td {
  background: var(--theme-bg-primary);
  color: var(--theme-text-primary);
}

.demo-table tr:hover td {
  background: var(--theme-bg-secondary);
}



/* 过渡动画 */
.modal-enter-active,
.modal-leave-active {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-enter-from,
.modal-leave-to {
  opacity: 0;
}

.modal-enter-from .modal-container,
.modal-leave-to .modal-container {
  transform: scale(0.95) translateY(20px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .syntax-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .syntax-right {
    min-height: 50px;
  }
}

@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
  }

  .modal-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }

  .modal-header {
    padding: 24px 20px;
  }

  .header-content {
    gap: 12px;
  }

  .header-icon {
    width: 40px;
    height: 40px;
  }

  .header-text h2 {
    font-size: 24px;
  }

  .modal-body {
    padding: 24px 20px;
  }

  .guide-sections {
    gap: 32px;
  }

  .section-header {
    gap: 10px;
    margin-bottom: 20px;
  }

  .section-icon {
    width: 32px;
    height: 32px;
  }

  .section-header h3 {
    font-size: 20px;
  }

  .syntax-list {
    gap: 12px;
  }

  .syntax-item {
    padding: 20px;
    gap: 12px;
  }

  .syntax-left h4 {
    font-size: 15px;
  }

  .syntax-left code {
    padding: 12px 16px;
    font-size: 12px;
  }

  .syntax-right {
    padding: 12px;
    min-height: 40px;
  }


}

@media (max-width: 480px) {
  .header-text h2 {
    font-size: 20px;
  }

  .header-text p {
    font-size: 13px;
  }

  .section-header h3 {
    font-size: 18px;
  }

  .card-header h4 {
    font-size: 15px;
  }

  .syntax-code code {
    font-size: 12px;
    padding: 10px 12px;
  }

  .demo-h1 { font-size: 20px; }
  .demo-h2 { font-size: 18px; }
  .demo-h3 { font-size: 16px; }
}